import type { App, Directive } from "vue";

// 自定义指令
import copy from "./modules/copy";//复制
import input from "./modules/input";//input自定义限制
import color from "./modules/color";//颜色设置

interface Directives {
    copy: Directive,
    input: Directive;
    color: Directive
}

// 注意：使用时需要(v-)开头
const directives: Directives = { copy,input,color };
 

export default {
    install(app: App) {
        Object.keys(directives).forEach(key => {
            app.directive(key, directives[key as keyof Directives]);
        });
    },
};